package top.kaoshanji.p1ch03c;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @author kaoshanji
 * ^_^
 * create time 2025/4/23 11:14
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = BlankDiscValueConfig.class)
public class BlankDiscValueTest {

    @Autowired
    private BlankDiscValue discVal;

    /**
     * 代码清单test-p1ch03c-02：测试一下@Value引用外部值
     */
    @Test
    public void assertBlankDiscProperties() {

        Assert.assertEquals("The Beatles", discVal.getArtist());
        Assert.assertEquals("Sgt. Peppers Lonely Hearts Club Band", discVal.getTitle());

    }


}
